package com.intct.util;

import org.apache.flink.api.java.utils.ParameterTool;

import java.io.IOException;

/**
 * @author gufg
 * @since 2025-07-03 12:29
 */
public class ParameterUtil {
    public static void readPropertiesFile(String fileName) {
        try {
            ParameterTool resourcePath = ParameterTool.fromPropertiesFile(ParameterUtil.class.getResourceAsStream(fileName));
            System.out.println(resourcePath.get("mysql-hostname1", "cdh-node1"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        readPropertiesFile("/flinkconf.properties");
    }
}
